package org.pay.core.service;

import org.pay.core.entity.MchSettRecord;

import java.util.List;

/**
 * @author: yangshancheng
 * @date: 17/12/7
 * @description:
 */
public interface IMchSettHandleService {

    /**
     * 申请结算
     * @param mchId
     * @param settAmount
     * @return
     */
    int applySett(Long mchId,  Long bankAccountId, Long settAmount);

    /**
     * 查询结算列表
     * @param offset
     * @param limit
     * @param mchSettRecord
     * @return
     */
    List<MchSettRecord> select(int offset, int limit, MchSettRecord mchSettRecord);

    /**
     * 查询个数
     * @param mchSettRecord
     * @return
     */
    int count(MchSettRecord mchSettRecord);

    /**
     * 审核结算
     * @param id
     * @return
     */
    int auditSett(Long id, Byte status, String remark);

    /**
     * 查询结算记录
     * @param mchId
     * @param id
     * @return
     */
    MchSettRecord findByMchIdAndId(Long mchId, Long id);

    /**
     * 查询结算记录
     * @param id
     * @return
     */
    MchSettRecord findById(Long id);

    /**
     * 打款
     * @param id
     * @return
     */
    int remit(Long id, Byte status, String remark, String remitRemark);

    List<MchSettRecord> select(int offset, int limit, List<Byte> settStatusList, MchSettRecord mchSettRecord);

    int count(List<Byte> settStatusList, MchSettRecord mchSettRecord);

}
